<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','admin');
?>
<div class="pad-10">
<div id="searchid" style="">
<!-- <form name="searchform" action="" method="get" >
<input type="hidden" value="<?php echo ROUTE_M;?>" name="m">
<input type="hidden" value="<?php echo ROUTE_C;?>" name="c">
<input type="hidden" value="<?php echo ROUTE_A;?>" name="a">
<input type="hidden" value="1" name="search">
<input type="hidden" value="<?php echo $pc_hash;?>" name="pc_hash">
<table width="100%" cellspacing="0" class="search-form">
    <tbody>
		<tr>
		<td>
		<div class="explain-col">				
			<?php echo L('contest_name')?>：<input name="name" type="text" value="<?php echo $_GET['name']?>" class="input-text" />
			<input type="submit" name="search" class="button" value="<?php echo L('search');?>" />
	</div>
		</td>
		</tr>
    </tbody>
</table>
</form> -->
</div>
<input type="hidden" value="" name="relation" id="relation">
<div class="table-list">
    <table width="100%" cellspacing="0" >
        <thead>
            <tr>
				<th align="left"><?php echo L('contest_name_'.$subject_type)?></th>
				<th align="left"><?php echo L('contest_year_'.$subject_type)?></th>
				<th align="left"><?php echo L('contest_start')?></th>
				<th align="left"><?php echo L('contest_end')?></th>
				<th align="left"><?php echo L('status')?></th>
            </tr>
        </thead>
    <tbody>
    <?php if ($categorys){?>
	<?php echo $categorys;?>
	<?php } else {
		echo "<tr><td colspan='5' style='color:red;font-size:18px;text-align:center;'><span>暂无数据！</span></td></tr>";
	}
	?>
	
	    </tbody>
    </table>
</div>
</div>
<style type="text/css">
 .line_ff9966,.line_ff9966:hover td{
	background-color:#FF9966;
}
 .line_fbffe4,.line_fbffe4:hover td {
	background-color:#fbffe4;
}
</style>
<SCRIPT LANGUAGE="JavaScript">
<!--


	function select_list(obj,id) {
		var relation_ids =$('#relation').val();
		if($(obj).attr('class')=='line_ff9966' || $(obj).attr('class')==null) {
			$(obj).attr('class','line_fbffe4');

			if(relation_ids !='' ) {
				var r_arr = relation_ids.split('|');
				var newrelation_ids = '';
				$.each(r_arr, function(i, n){
					if(n!=id) {
						if(i==0) {
							newrelation_ids = n;
						} else {
						 newrelation_ids = newrelation_ids+'|'+n;
						}
					}
				});
				$('#relation').val(newrelation_ids);
			}
		} else {
			var data = $(obj).attr('data');
			if (data == 1) {
				alert('该赛事已绑定');
				return false;
			}
			$(obj).attr('class','line_ff9966');
			if(relation_ids =='' ) {
				$('#relation').val(id);
			} else {
				relation_ids = relation_ids+'|'+id;
				$('#relation').val(relation_ids);
			}
		}
}
//-->
</SCRIPT>
</body>
</html>